﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace QLNSClient
{
    public partial class uc_dsCanboNgachBacHeso : UserControl
    {

        QLNSServiceReference.QLNSServiceClient sv = new QLNSServiceReference.QLNSServiceClient();
        
        public uc_dsCanboNgachBacHeso()
        {
            InitializeComponent();
        }

        private void gv_dsCanboNgachBacHeso_Click(object sender, EventArgs e)
        {

        }

        private void groupControl1_Paint(object sender, PaintEventArgs e)
        {

        }

        private void uc_dsCanboNgachBacHeso_Load(object sender, EventArgs e)
        {
            LoadData();
        }
        public void LoadData()
        {
            gv_dsCanboNgachBacHeso.DataSource = sv.getCBNL();
            lke_DVHC.Properties.DataSource = sv.getDVHC();
        }

        private void lke_DVHC_EditValueChanged(object sender, EventArgs e)
        {
            string a = lke_DVHC.EditValue.ToString();
            MessageBox.Show(a);
            gv_dsCanboNgachBacHeso.DataSource = sv.getCBNLtheoDV(a);
        }
    }
}
